#include <gtest/gtest.h>

#include <algorithm>
#include <find-kth-largest.hpp>
#include <macros.hpp>
#include <vector>

using namespace std;

TEST(FindKthLargestTest, Exp1) {
    vector<int> v = {3, 2, 1, 5, 6, 4};
    macro_test("", "", 5, answer, v, 2);
}

TEST(FindKthLargestTest, Exp2) {
    vector<int> v = {3, 2, 3, 1, 2, 4, 5, 5, 6};
    macro_test("", "", 4, answer, v, 4);
}

TEST(FindKthLargestTest, Exp3) {
    vector<int> v = {3, 2, 1, 5, 6, 4};
    macro_test("", "", 5, official_answer, v, 2);
}

TEST(FindKthLargestTest, Exp4) {
    vector<int> v = {3, 2, 3, 1, 2, 4, 5, 5, 6};
    macro_test("", "", 4, official_answer, v, 4);
}

int main(int argc, char* argv[]) {
    testing::InitGoogleTest(&argc, argv);
    int result = RUN_ALL_TESTS();
    return result;
}